<template>
	<view>
		<txl @ev="evFunc" :datas="datas" color="#b5b4b4" :index="true" name="employeeName" @healthRank="gethealthRank"></txl>
	</view>
</template>
<script>
import txl from '@/components/yt-txl/index.vue';
export default {
    components:{txl},
    data() {
		let datas = []
        return {
            datas:[]
        };
    },
	onLoad(){
		this.getList({pageIndex:1,pageSize:20,healthRank:1,phone:'',realName:''})
	},
    methods: {
		getList(data){
			this.$api.addressList(data).then(res=>{
				this.datas = res.data.result && res.data.result.list && res.data.result.list.map((a)=>{
					return {
						"employeeName": a.realName,
						"phone": a.phone,
						"appellations": a.appellations,
						"realName":a.realName,
						"code":a.code,
						"codeId":a.codeId,
						"headPicture":a.headPicture
					}
				}) || []
			})
		},
        evFunc(data){
            console.log(data)
        },
		gethealthRank(e){
			this.getList({pageIndex:1,pageSize:20,healthRank:e,phone:'',realName:''})
		},
    }
};
</script>
<style>
</style>
